-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append newline to printed documents #391
Conversation
return VisitAsync(node, context); | ||
await VisitAsync(node, context).ConfigureAwait(false); | ||
if (!context.NewLinePrinted && node is GraphQLDocument) | ||
await writer.WriteLineAsync().ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes were made only within PrintAsync
and only for printed documents, not for individual nodes being printed, or where VisitAsync
was called directly and the context could be examined to determine whether or not a newline had been printed.
|
||
extend type Foo @onType No newline at end of file | ||
extend type Foo @onType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes these issues -- generated documents did not include a terminating newline before.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #391 +/- ##
==========================================
- Coverage 96.12% 96.10% -0.02%
==========================================
Files 89 89
Lines 5030 5032 +2
Branches 500 500
==========================================
+ Hits 4835 4836 +1
Misses 194 194
- Partials 1 2 +1 ☔ View full report in Codecov by Sentry. |
I'd like this merged in for v9.4.0 in preparation for GraphQL.NET v8.0. Note: GraphQL.NET v7.x uses the v8 parser.